package com.hpin.mlxteacher.sort;


import com.hpin.mlxteacher.bean.GroupSettingBean;

import java.util.Comparator;

/**
 * Created by Aaron on 16/5/18.
 */
public class DelNumsComparator implements Comparator<GroupSettingBean.TopicEntity.UserListEntity> {

    public int compare(GroupSettingBean.TopicEntity.UserListEntity c1, GroupSettingBean.TopicEntity.UserListEntity c2) {
        if (c1.user.sortLetters.equals("@")
                || c2.user.sortLetters.equals("#")) {
            return -1;
        } else if (c1.user.sortLetters.equals("#")
                || c2.user.sortLetters.equals("@")) {
            return 1;
        } else {
            return c1.user.sortLetters.compareTo(c2.user.sortLetters);
        }
    }

}
